#ifndef MONEYDELEGATE_H
#define MONEYDELEGATE_H

#include <QItemDelegate>

class MoneyDelegate : public QItemDelegate
{
    Q_OBJECT
public:
    MoneyDelegate(QObject *parent = 0, bool zero = true);

    //QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,const QModelIndex &index) const;
    //void setEditorData(QWidget *editor, const QModelIndex &index) const;
    //void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
    //void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
    void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
    QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;

private:
    bool zeroIfNull;

};

#endif // MONEYDELEGATE_H
